package com.kfm.am;

import java.util.Vector;

public class GenShinTest {

    public static void main(String[] args) {
        Vector vector = new Vector();
        System.out.println(vector.capacity());
        vector.add(new GenShin("胡桃", "护摩", 1, "张一健"));
        vector.add(new GenShin("枫原万叶", "铁蜂刺", 2, "李国伟"));
        vector.add(new GenShin("钟离", "护摩", 2, "王成"));
        vector.add(new GenShin("魈", "和璞鸢", 6, "魏桃"));
        vector.add(new GenShin("神里绫华", "雾切", 1, "万珺"));
//        vector.add(1);
//        vector.add(31);
//        vector.add(13);
//        vector.add(21);
//        vector.add(11);
        for (Object object : vector) {
            System.out.println(object);
        }
        sort(vector);
        System.out.println("排序后");
        for (Object object : vector) {
            System.out.println(object);
        }
    }

    public static void sort(Vector vector) {
//        int size = vector.size();
//        for (int i = 0; i < size; i ++) {
//
//            for (int j = 0; j < size - i - 1; j ++) {
//                GenShin genShin = (GenShin) vector.get(j);
//                GenShin genShin1 = (GenShin) vector.get(j + 1);
////                if (genShin > genShin1) {
////
////                }
//                if (genShin.getOrderSeat() < genShin1.getOrderSeat()) {
//                    vector.set(j, genShin1); // 将j位置的值替换成genShin1这个对象
//                    vector.set(j + 1, genShin);
//                }
//            }
//        }
    }
}
